import axiosInstance from '@/api/axiosInstance'
interface consultPlanListParams {
  title?: string
  // 其他查询条件...
}

// 获取诊金方案列表
export const getConsultPlanList = async (params?: consultPlanListParams) => {
  return axiosInstance.get('/admin/consult-plan', { params })
}

//获取诊金方案啊选项
export const getConsultPlanOptions = async () => {
  return axiosInstance.get(`/admin/consult-plan/options`)
}

// 获取诊金方案详情
export const getConsultPlanDetail = async (id: number) => {
  return axiosInstance.get(`/admin/consult-plan/${id}`)
}
// 创建诊金方案
export const createConsultPlan = async (data: any) => {
  return axiosInstance.post('/admin/consult-plan', data)
}

// 更新诊金方案
export const updateConsultPlan = async (id: number, data: any) => {
  return axiosInstance.put(`/admin/consult-plan/${id}`, data)
}

// 删除诊金方案
export const deleteConsultPlan = async (id: number) => {
  return axiosInstance.delete(`/admin/consult-plan/${id}`)
}

// 设置诊金方案项
export const setConsultTypes = async (id: number, data: any) => {
  return axiosInstance.post(`/admin/consult-plan/${id}/consult-types`, data)
}


